/*
 * @Author: cola(sunshiwen)
 * @Date: 2022-05-06 20:59:09
 * @LastEditTime: 2022-05-07 19:50:47
 * @LastEditors: cola(sunshiwen)
 * @Description: 
 * @FilePath: /maycur-koa/router/deployManage.js
 */
'use strict';
const { deployManageSchema } = require('../schema');
const { deployManageCtrl } = require('../controller');
// 路由列表
module.exports = [
    // 获取可部署的产品应用
    {
        method: 'get',
        path: '/deploy-manage/products',
        controller: deployManageCtrl.fetchDeployProductList,
    },
    // 新增可部署的产品应用
    {
        method: 'post',
        path: '/deploy-manage/products/new',
        controller: deployManageCtrl.addNewDeployProduct,
        paramSchema: deployManageSchema.addNewDeployProduct,
    },
    // 获取产品应用下可部署的环境列表
    {
        method: 'get',
        path: '/deploy-manage/envs/:category',
        controller: deployManageCtrl.fetchDeployEnvList,
        paramSchema: deployManageSchema.fetchDeployEnvList,
    },
    // 新增部署环境
    {
        method: 'post',
        path: '/deploy-manage/envs/new',
        controller: deployManageCtrl.addNewDeployEnv,
        paramSchema: deployManageSchema.addNewDeployEnv,
    },
    // 修改部署环境
    {
        method: 'put',
        path: '/deploy-manage/envs/update',
        controller: deployManageCtrl.updateDeployEnv,
        paramSchema: deployManageSchema.updateDeployEnv,
    }
]